load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("sapling")

rust_library(
    name = "dag-types",
    srcs = glob(["src/**/*.rs"]),
    autocargo = {"cargo_toml_config": {
        "dependencies_override": {"dependencies": {
            "sapling-minibytes": {
                "default-features": False,
                "features": [],
            },
        }},
        "features": {
            "for-tests": ["quickcheck"],
        },
        "lib": {"name": "dag-types"},
        "package": {
            "authors": ["Meta Source Control Team <sourcecontrol-dev@meta.com>"],
            "description": "A subset of types used by sapling-dag",
            "homepage": "https://sapling-scm.com/",
            "license": "MIT",
            "name": "sapling-dag-types",
            "repository": "https://github.com/facebook/sapling",
        },
    }},
    crate_root = "src/lib.rs",
    features = [
        "for-tests",
    ],
    test_deps = [
        "fbsource//third-party/rust:quickcheck",
    ],
    deps = [
        "fbsource//third-party/rust:quickcheck",
        "fbsource//third-party/rust:serde",
        "//eden/scm/lib/minibytes:minibytes",
    ],
)
